#include <opencv2/core.hpp>
#include <iostream>

using namespace std;
using namespace cv;

int main(int argc,char *argv[])
{
    Mat A=Mat::ones(2,3,CV_32FC1);
    Mat B=Mat::ones(3,2,CV_32FC1);
    Mat AB;

    A.at<float>(0,0)=1;
    A.at<float>(0,1)=1;
    A.at<float>(0,2)=1;
    A.at<float>(1,0)=1;
    A.at<float>(1,1)=1;
    A.at<float>(1,2)=1;

    B.at<float>(0,0)=1;
    B.at<float>(0,1)=4;
    B.at<float>(1,0)=2;
    B.at<float>(1,1)=5;
    B.at<float>(2,0)=3;
    B.at<float>(2,1)=6;

    AB=A*B;

    cout<<"A=\n"<<A<<endl<<endl;
    cout<<"B=\n"<<B<<endl<<endl;
    cout<<"AB=\n"<<AB<<endl<<endl;

    system("pause");
}
